package com.kly.user.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.kly.user.db.dao.ImNoticeConfigDao;
import com.kly.user.db.entity.ImNoticeConfigEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * User: user
 * Date: 2024-01-23
 * Time: 15:32:51.452
 */

@Repository
public class ImNoticeConfigDaoImpl extends AbstractBaseMapper<ImNoticeConfigEntity> implements ImNoticeConfigDao {

    @Override
    public List<Integer> getPopImNums(String appCode) {
        Map<String, Object> params = new HashMap<>();
        params.put("appCode", appCode);
        return this.getSqlSession().selectList(this.getStatement("getPopImNums"), params);
    }

    @Override
    public ImNoticeConfigEntity getNoticeConfig(Integer popImNum, String appCode) {
        Map<String, Object> params = new HashMap<>();
        params.put("popImNum", popImNum);
        params.put("appCode", appCode);
        return this.getSqlSession().selectOne(this.getStatement("getNoticeConfig"), params);
    }
}